home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgramD2.iso
/
Visual Database
/
Visual dBase v5.5
/
SAMPLES1.PAK
/
SWITCH.WFM
< prev
next >
Wrap
Text File
|
1995-07-18
|
3KB
|
107 lines
*******************************************************************************
* PROGRAM: Switch.wfm
*
* WRITTEN BY: Borland Samples Group
*
* DATE: 5/93
*
* UPDATED: 7/95
*
* REVISION: $Revision: 1.31 $
*
* VERSION: Visual dBASE
*
* DESCRIPTION: This is a very simple program illustrating the use of VBX
* controls with Visual dBASE. The Forms Designer helps
* you work with VBX controls by allowing you to visually
* manipulate and change the VBX control properties just like
* you can with the regular Visual dBASE built in controls
*
* PARAMETERS: None
*
* CALLS: Switch.vbx (VBX control)
*
* USAGE: DO Switch.wfm
*
*******************************************************************************
create session
set talk off
set ldCheck off
** END HEADER -- do not remove this line*
* Generated on 07/11/95
*
parameter bModal
local f
f = new SWITCHFORM()
if (bModal)
f.mdi = .F. && ensure not MDI
f.ReadModal()
else
f.Open()
endif
CLASS SWITCHFORM OF FORM
Set Procedure To BUTTONS.CC additive
this.OnOpen = CLASS::FORM_ONOPEN
this.Width = 25.666
this.Top = 5.2344
this.Height = 6.7646
this.Left = 24.833
this.Text = ""
this.ColorNormal = "BTNTEXT/BTNFACE"
load dll &_dbwinhome.samples\SWITCH.VBX
DEFINE BISWITCH BISWITCH1 OF THIS;
PROPERTY;
OnOpen CLASS::BISWITCH1_ONOFF,;
Width 10.0342,;
Top 1.5,;
Height 3.9102,;
Left 8.2979,;
VBStream "SWITCH.BFM 56",;
OnOn CLASS::BISWITCH1_ONON,;
OnOff CLASS::BISWITCH1_ONOFF
DEFINE SAMPLEINFOBUTTON SWITCHINFOBUTTON OF THIS;
PROPERTY;
Width 3.5,;
Height 1.1758,;
Left 22,;
Group .T.
Procedure Form_OnOpen
****************************************************************************
form.switchInfoButton.sampleName = "Switch.wfm"
****************************************************************************
Procedure BISWITCH1_OnOn
* Indicate switch is on, and change form color.
****************************************************************************
this.caption = "ON"
form.colorNormal = "BTNTEXT/R+"
****************************************************************************
Procedure BISWITCH1_OnOff
* Indicate switch is off, and change form color back to normal.
****************************************************************************
this.caption = "OFF"
form.colorNormal = "BTNTEXT/BTNFACE"
ENDCLASS